package com.example.buyticketlishi.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public class LiShihandSetReserveProductRequsetBean implements Parcelable {

    @Override
    public String toString() {
        return "LiShihandSetReserveProductRequsetBean{" +
                "saleChannelType=" + saleChannelType +
                ", remark='" + remark + '\'' +
                ", printTicketMode=" + printTicketMode +
                ", productParamList=" + productParamList +
                '}';
    }

    /**
     * saleChannelType : 1
     * remark : 3213412
     * printTicketMode : 1
     * productParamList : [{"arriveDT":"2020-04-14","scenicTicketId":10000000133003,"shiftsId":10000000035038,"saleSum":1,"customerDiscountType":1,"timeControlParamList":[{"projectId":10000000057002,"ordTimeControlId":9032}],"certificateParamList":[{"certificateName":"321","certificateTypeId":1,"certificateNo":"110101199003071997"}]}]
     */



    private int saleChannelType;
    private String remark;
    private int printTicketMode;
    private List<ProductParamListBean> productParamList;

    public LiShihandSetReserveProductRequsetBean() {
    }


    protected LiShihandSetReserveProductRequsetBean(Parcel in) {
        saleChannelType = in.readInt();
        remark = in.readString();
        printTicketMode = in.readInt();
        productParamList = in.createTypedArrayList(ProductParamListBean.CREATOR);
    }

    public static final Creator<LiShihandSetReserveProductRequsetBean> CREATOR = new Creator<LiShihandSetReserveProductRequsetBean>() {
        @Override
        public LiShihandSetReserveProductRequsetBean createFromParcel(Parcel in) {
            return new LiShihandSetReserveProductRequsetBean(in);
        }

        @Override
        public LiShihandSetReserveProductRequsetBean[] newArray(int size) {
            return new LiShihandSetReserveProductRequsetBean[size];
        }
    };

    public int getSaleChannelType() {
        return saleChannelType;
    }

    public void setSaleChannelType(int saleChannelType) {
        this.saleChannelType = saleChannelType;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public int getPrintTicketMode() {
        return printTicketMode;
    }

    public void setPrintTicketMode(int printTicketMode) {
        this.printTicketMode = printTicketMode;
    }

    public List<ProductParamListBean> getProductParamList() {
        return productParamList;
    }

    public void setProductParamList(List<ProductParamListBean> productParamList) {
        this.productParamList = productParamList;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(saleChannelType);
        dest.writeString(remark);
        dest.writeInt(printTicketMode);
        dest.writeTypedList(productParamList);
    }


    public static class ProductParamListBean implements Parcelable{

        @Override
        public String toString() {
            return "ProductParamListBean{" +
                    "arriveDT='" + arriveDT + '\'' +
                    ", scenicTicketId=" + scenicTicketId +
                    ", shiftsId=" + shiftsId +
                    ", saleSum=" + saleSum +
                    ", customerDiscountType=" + customerDiscountType +
                    ", timeControlParamList=" + timeControlParamList +
                    ", certificateParamList=" + certificateParamList +
                    ", certificateFlag=" + certificateFlag +
                    ", bookByTimeFlag='" + bookByTimeFlag + '\'' +
                    '}';
        }

        public ProductParamListBean() {
        }


        /**
         * arriveDT : 2020-04-14
         * scenicTicketId : 10000000133003
         * shiftsId : 10000000035038
         * saleSum : 1
         * customerDiscountType : 1
         * timeControlParamList : [{"projectId":10000000057002,"ordTimeControlId":9032}]
         * certificateParamList : [{"certificateName":"321","certificateTypeId":1,"certificateNo":"110101199003071997"}]
         */


        private String arriveDT;
        private long scenicTicketId;
        private long shiftsId;
        private int saleSum;
        private int customerDiscountType;
        private List<TimeControlParamListBean> timeControlParamList;
        private List<CertificateParamListBean> certificateParamList;

        //实名标记，方便后面判断  0-非实名， 1-实名
        private int certificateFlag;
        private String bookByTimeFlag;
        private String scenicTicketName;

        //新加的字段 吃饱饭没事干
        private int minAge;
        private int maxAge;

        public int getMinAge() {
            return minAge;
        }

        public void setMinAge(int minAge) {
            this.minAge = minAge;
        }

        public int getMaxAge() {
            return maxAge;
        }

        public void setMaxAge(int maxAge) {
            this.maxAge = maxAge;
        }

        public String getScenicTicketName() {
            return scenicTicketName;
        }

        public void setScenicTicketName(String scenicTicketName) {
            this.scenicTicketName = scenicTicketName;
        }

        protected ProductParamListBean(Parcel in) {
            arriveDT = in.readString();
            scenicTicketId = in.readLong();
            shiftsId = in.readLong();
            saleSum = in.readInt();
            customerDiscountType = in.readInt();
            timeControlParamList = in.createTypedArrayList(TimeControlParamListBean.CREATOR);
            certificateParamList = in.createTypedArrayList(CertificateParamListBean.CREATOR);
            certificateFlag = in.readInt();
            minAge = in.readInt();
            maxAge = in.readInt();
            bookByTimeFlag = in.readString();
            scenicTicketName = in.readString();

        }

        public static final Creator<ProductParamListBean> CREATOR = new Creator<ProductParamListBean>() {
            @Override
            public ProductParamListBean createFromParcel(Parcel in) {
                return new ProductParamListBean(in);
            }

            @Override
            public ProductParamListBean[] newArray(int size) {
                return new ProductParamListBean[size];
            }
        };

        public String getBookByTimeFlag() {
            return bookByTimeFlag;
        }

        public void setBookByTimeFlag(String bookByTimeFlag) {
            this.bookByTimeFlag = bookByTimeFlag;
        }

        public int getCertificateFlag() {
            return certificateFlag;
        }

        public void setCertificateFlag(int certificateFlag) {
            this.certificateFlag = certificateFlag;
        }

        public String getArriveDT() {
            return arriveDT;
        }

        public void setArriveDT(String arriveDT) {
            this.arriveDT = arriveDT;
        }

        public long getScenicTicketId() {
            return scenicTicketId;
        }

        public void setScenicTicketId(long scenicTicketId) {
            this.scenicTicketId = scenicTicketId;
        }

        public long getShiftsId() {
            return shiftsId;
        }

        public void setShiftsId(long shiftsId) {
            this.shiftsId = shiftsId;
        }

        public int getSaleSum() {
            return saleSum;
        }

        public void setSaleSum(int saleSum) {
            this.saleSum = saleSum;
        }

        public int getCustomerDiscountType() {
            return customerDiscountType;
        }

        public void setCustomerDiscountType(int customerDiscountType) {
            this.customerDiscountType = customerDiscountType;
        }

        public List<TimeControlParamListBean> getTimeControlParamList() {
            return timeControlParamList;
        }

        public void setTimeControlParamList(List<TimeControlParamListBean> timeControlParamList) {
            this.timeControlParamList = timeControlParamList;
        }

        public List<CertificateParamListBean> getCertificateParamList() {
            return certificateParamList;
        }

        public void setCertificateParamList(List<CertificateParamListBean> certificateParamList) {
            this.certificateParamList = certificateParamList;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(arriveDT);
            dest.writeLong(scenicTicketId);
            dest.writeLong(shiftsId);
            dest.writeInt(saleSum);
            dest.writeInt(customerDiscountType);
            dest.writeTypedList(timeControlParamList);
            dest.writeTypedList(certificateParamList);
            dest.writeInt(certificateFlag);
            dest.writeInt(minAge);
            dest.writeInt(maxAge);
            dest.writeString(bookByTimeFlag);
            dest.writeString(scenicTicketName);
        }


        public static class TimeControlParamListBean implements Parcelable {

            @Override
            public String toString() {
                return "TimeControlParamListBean{" +
                        "projectId=" + projectId +
                        ", ordTimeControlId=" + ordTimeControlId +
                        '}';
            }

            public TimeControlParamListBean() {
            }


            /**
             * projectId : 10000000057002
             * ordTimeControlId : 9032
             */

            private long projectId;
            private long ordTimeControlId;

            protected TimeControlParamListBean(Parcel in) {
                projectId = in.readLong();
                ordTimeControlId = in.readLong();
            }

            public static final Creator<TimeControlParamListBean> CREATOR = new Creator<TimeControlParamListBean>() {
                @Override
                public TimeControlParamListBean createFromParcel(Parcel in) {
                    return new TimeControlParamListBean(in);
                }

                @Override
                public TimeControlParamListBean[] newArray(int size) {
                    return new TimeControlParamListBean[size];
                }
            };

            public long getProjectId() {
                return projectId;
            }

            public void setProjectId(long projectId) {
                this.projectId = projectId;
            }

            public long getOrdTimeControlId() {
                return ordTimeControlId;
            }

            public void setOrdTimeControlId(long ordTimeControlId) {
                this.ordTimeControlId = ordTimeControlId;
            }


            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeLong(projectId);
                dest.writeLong(ordTimeControlId);
            }
        }

        public static class CertificateParamListBean implements Parcelable{

            @Override
            public String toString() {
                return "CertificateParamListBean{" +
                        "certificateName='" + certificateName + '\'' +
                        ", certificateTypeId=" + certificateTypeId +
                        ", certificateNo='" + certificateNo + '\'' +
                        '}';
            }

            public CertificateParamListBean() {
            }

            protected CertificateParamListBean(Parcel in) {
                certificateName = in.readString();
                certificateTypeId = in.readInt();
                certificateNo = in.readString();
                ticketName = in.readString();
                ticketNumber = in.readLong();
                minAge = in.readInt();
                maxAge = in.readInt();
            }


            /**
             * certificateName : 321
             * certificateTypeId : 1
             * certificateNo : 110101199003071997
             */

            private String certificateName;
            private int certificateTypeId;
            private String certificateNo;

            private String ticketName;
            private Long ticketNumber;

            //新加的字段 吃饱饭没事干
            private int minAge;
            private int maxAge;

            public int getMinAge() {
                return minAge;
            }

            public void setMinAge(int minAge) {
                this.minAge = minAge;
            }

            public int getMaxAge() {
                return maxAge;
            }

            public void setMaxAge(int maxAge) {
                this.maxAge = maxAge;
            }





            public Long getTicketNumber() {
                return ticketNumber;
            }

            public void setTicketNumber(Long ticketNumber) {
                this.ticketNumber = ticketNumber;
            }




            public String getTicketName() {
                return ticketName;
            }

            public void setTicketName(String ticketName) {
                this.ticketName = ticketName;
            }

            public static final Creator<CertificateParamListBean> CREATOR = new Creator<CertificateParamListBean>() {
                @Override
                public CertificateParamListBean createFromParcel(Parcel in) {
                    return new CertificateParamListBean(in);
                }

                @Override
                public CertificateParamListBean[] newArray(int size) {
                    return new CertificateParamListBean[size];
                }
            };

            public String getCertificateName() {
                return certificateName;
            }

            public void setCertificateName(String certificateName) {
                this.certificateName = certificateName;
            }

            public int getCertificateTypeId() {
                return certificateTypeId;
            }

            public void setCertificateTypeId(int certificateTypeId) {
                this.certificateTypeId = certificateTypeId;
            }

            public String getCertificateNo() {
                return certificateNo;
            }

            public void setCertificateNo(String certificateNo) {
                this.certificateNo = certificateNo;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(certificateName);
                dest.writeInt(certificateTypeId);
                dest.writeString(certificateNo);
                dest.writeString(ticketName);
                dest.writeLong(ticketNumber);
                dest.writeInt(minAge);
                dest.writeInt(maxAge);
            }
        }
    }
}
